package com.aaa.user.controller;

import com.aaa.user.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    UserService userService;

    @GetMapping(value = "/findShop")
    public String findShop(){
        return userService.findShop();
    }

    @GetMapping(value = "/findOrderById/{id}")
    public String findOrderById(@PathVariable("id")Long id ) throws InterruptedException {
        //Thread.sleep(7000);
        System.out.println(id+"-------------------");
        return id.toString();
    }
}
